-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker build and publishing #30
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
throw new Error( | ||
"NEXT_PUBLIC_EXPLORER_API_URL environment variable is required for GraphQL code generation.", | ||
); | ||
const schema = "https://squid.subsquid.io/cartesi-rollups-mainnet/graphql"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tuler, Is it not better to get from the environment variable instead of hardcoded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem of using the environment is that often we want to build for localhost but the localhost environment is not necessarily running during the build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then you can set up that build to whatever URL you want to work with. Because the environments (sepolia/mainnet) may be in parity now, but that is not guaranteed, and the testnet is more likely to have new graphQL updates that would cause build problems on Vercel, for example. I think we don't have this defined here on GitHub action variables, but I would setup to use Sepolia endpoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe we should separate the NEXT_PUBLIC_EXPLORER_API_URL
variable from the variable used by the codegen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. For now, it shouldn't be a problem and should not be a blocker to proceed with Sunodo's developments. But we will need to improve that part for this code generator to support multiple situations, e.g. Our own Vercel deployments, docker image generation for external use, etc.
Build a docker image with the nextjs application.
Followed the guidelines at https://turbo.build/repo/docs/handbook/deploying-with-docker and also https://nextjs.org/docs/pages/building-your-application/deploying#docker-image